//
//  PGNormalStatusCell.swift
//  PGWeibo
//
//  Created by Apple on 15/11/11.
//  Copyright © 2015年 Apple. All rights reserved.
//

import UIKit

class PGNormalStatusCell: PGStatusCell {

    override var viewModel: PGStatusViewModel? {
        didSet{
            /// 没有缩略图
            pictureView.snp_updateConstraints { (make) -> Void in
                let margin = viewModel?.thumbnailUrls?.count > 0 ? statusCellMargin : 0
                make.top.equalTo(contentLabel.snp_bottom).offset(margin)
            }
        }
    }
    
    override func setupUI() {
        super.setupUI()
        pictureView.snp_makeConstraints { (make) -> Void in
            make.left.equalTo(contentLabel.snp_left)
            make.top.equalTo(contentLabel.snp_bottom).offset(statusCellMargin)
            make.width.equalTo(200)
            make.height.equalTo(100)
        }
    }

}
